This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Evelyn Kiponever 9.Jan.04 11:19 PM a Web browser Notes Client 6.0.3 Windows 2000
Hi Everybody,
A document with a text field x has a value 5.
This is selected in a view. There is validation in the the script to trap invalid values.
When view column is edited in notes and the value is modified to 5&. The Invalid value message is shown desired but thereafter notes
throws an error message "Error validating column value".
Is there any solution to this problem ?
Thanks
Satyajit
************************************
The inview edit script is as below
Sub Inviewedit(Source As Notesuiview, Requesttype As Integer, Colprogname As Variant, Columnvalue As Variant, Continue As Variant)
REM Define variables
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim caret As String
REM Get the CaretNoteID - exit if it does not point at a document
caret = Source.CaretNoteID
If caret = "0" Then Exit Sub
REM Get the current database and document
Set db = Source.View.Parent
Set doc = db.GetDocumentByID(caret)
REM Select the request type
Select Case Requesttype
Case QUERY_REQUEST
REM Reserved - do not use in Release 6.0
Case VALIDATE_REQUEST
Msgbox "Columnvalue(0) "&Columnvalue(0)
REM Cause validation error if user tries to exit column with no value
If Instr(Columnvalue(0)," ") Then
Continue = False
Msgbox "with space"
End If
If Instr(Columnvalue(0),"&") Then
Continue = False
Msgbox "with&"
Exit Sub
End If
Case SAVE_REQUEST
REM Write the edited column view entries back to the document
For i = 0 To Ubound(Colprogname)
Call doc.ReplaceItemValue(Colprogname(i), Columnvalue(i))
Next
REM Save(force, createResponse, markRead)
Call doc.Save(True, True, True)
Case NEWENTRY_REQUEST
REM Create document and create "Form" item
REM Write column values to the new document
Set doc = New NotesDocument(db)
Call doc.ReplaceItemValue("Form", "Test")
For i = 0 To Ubound(Colprogname)
Call doc.ReplaceItemValue(Colprogname(i), Columnvalue(i))
Next
REM Save(force, createResponse, markRead)
Call doc.Save(True, True, True)